<ui:composition template = "template.xhtml"
                xmlns ="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core">
    <ui:define name ="conteudo">

        <h:form>

            <h:button value="Novo Registro" outcome="novoRegistro" >
                <f:param name="chave" value="#{acervos.acervo.chaveAcervo}" />
            </h:button>
            
                <h2>Lista de Registros</h2>
                
                <h:dataTable value="#{acervoRegistros.acervoRegistros}" var="registro">
                    
                    <h:column>
                        <h:link value="#{registro.registro}" outcome="mostraRegistro" >
                            <f:param name="chaveReg" value="#{registro.registro}" />
                        </h:link> 
                    </h:column>

                    <h:column>
                        <h:link value="Edita" outcome="editaRegistro" >
                            <f:param name="chave" value="#{registro.registro}" />
                        </h:link> 
                    </h:column>

                    <h:column>
                        <h:form>
                            <h:commandLink value="Deleta" action="#{acervoRegistros.delete()}" >
                                <f:param name="chave" value="#{registro.registro}" />
                            </h:commandLink> 
                        </h:form>
                    </h:column>

                </h:dataTable>

        </h:form>

    </ui:define>
</ui:composition>